var pwDatas = [
	{"title":"08款丰田卡罗拉 ","price":"1950","pid":"1177933","img_src":"images/img-1.jpg"},
	{"title":"14款丰田卡罗拉 ","price":"2100","pid":"1177934","img_src":"images/img-2.jpg"},
	{"title":"10款丰田新锐志V2 ","price":"2000","pid":"1177935","img_src":"images/img-3.jpg"},
	{"title":"13款丰田新锐志 ","price":"2050","pid":"1177936","img_src":"images/img-4.jpg"},
	{"title":"10款丰田新霸道 ","price":"2050","pid":"1177937","img_src":"images/img-5.jpg"},
	{"title":"13款丰田新RAV4-V2 ","price":"2050","pid":"1177938","img_src":"images/img-6.jpg"},
	{"title":"12款丰田新凯美瑞V1 ","price":"1950","pid":"1177939","img_src":"images/img-7.jpg"},
	{"title":"15款丰田凯美瑞 ","price":"2200","pid":"1177940","img_src":"images/img-8.jpg"},
	{"title":"15款丰田新汉兰 ","price":"2250","pid":"1177941","img_src":"images/img-9.jpg"},
	{"title":"14款丰田雷凌 ","price":"2150","pid":"1177942","img_src":"images/img-10.jpg"},
	{"title":"12款本田新CR-VV1 ","price":"1950","pid":"1177944","img_src":"images/img-11.jpg"},
	{"title":"12款本田新CR-V-V2 ","price":"2050","pid":"1177946","img_src":"images/img-12.jpg"},
	{"title":"09款日产新天籁(08-12) ","price":"1950","pid":"1177947","img_src":"images/img-13.jpg"},
	{"title":"13款日产新天籁 ","price":"2050","pid":"1177949","img_src":"images/img-14.jpg"},
	{"title":"14款日产新奇骏 ","price":"2200","pid":"1177951","img_src":"images/img-15.jpg"},
	{"title":"12款福特新福克斯V1 ","price":"2050","pid":"1177953","img_src":"images/img-16.jpg"},
	{"title":"13款福特翼虎V1 ","price":"2150","pid":"1177954","img_src":"images/img-17.jpg"},
	{"title":"13款福特新蒙迪欧 ","price":"2250","pid":"1177956","img_src":"images/img-18.jpg"},
	{"title":"15款福特福睿斯 ","price":"2250","pid":"1177958","img_src":"images/img-20.jpg"},
	{"title":"15款长安福特福克斯 ","price":"2200","pid":"1177960","img_src":"images/img-21.jpg"},
	{"title":"09-13款雪佛兰科鲁兹 ","price":"1750","pid":"1177962","img_src":"images/img-23.jpg"},
	{"title":"12款雪佛兰迈锐宝 ","price":"2150","pid":"1177964","img_src":"images/img-24.jpg"},
	{"title":"12款大众新朗逸(13-15) ","price":"2250","pid":"1177965","img_src":"images/img-26.jpg"},
	{"title":"16款大众新朗逸  ","price":"2150","pid":"1177967","img_src":"images/img-27.jpg"},
	{"title":"10款大众途观v1(10-12) ","price":"2050","pid":"1177968","img_src":"images/img-28.jpg"},
	{"title":"10款大众途观V2(10-12) ","price":"1950","pid":"1177969","img_src":"images/img-29.jpg"},
	{"title":"10款大众新途安 ","price":"2250","pid":"1177971","img_src":"images/img-30.jpg"},
	{"title":"13款大众新桑塔纳 ","price":"1850","pid":"1177973","img_src":"images/img-31.jpg"},
	{"title":"13款大众新宝来V1 ","price":"1950","pid":"1177976","img_src":"images/img-32.jpg"},
	{"title":"13款大众新宝来V2 ","price":"1950","pid":"1177977","img_src":"images/img-33.jpg"},
	{"title":"13款大众新宝来V3 ","price":"2050","pid":"1177979","img_src":"images/img-34.jpg"},
	{"title":"15款起亚K2 ","price":"2050","pid":"1177983","img_src":"images/img-35.jpg"}
	
	]

// 2.实例Vue对象
	new Vue({
	    el: '.g-box',
	    data: {
			pwData: pwDatas
	    },
	    methods: {
	    	// APP端接口
	    	getApp:function(key,value){
	    		var appData = {"key":key,"value":value};
	    		// alert("key值是:"+key+",vlaue值是:"+value);
	    		//判断访问终端
					var browser={
					    versions:function(){
					        var u = navigator.userAgent, app = navigator.appVersion;
					        return {
					            trident: u.indexOf('Trident') > -1, //IE内核
					            presto: u.indexOf('Presto') > -1, //opera内核
					            webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
					            gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,//火狐内核
					            mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
					            ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
					            android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
					            iPhone: u.indexOf('iPhone') > -1 , //是否为iPhone或者QQHD浏览器
					            iPad: u.indexOf('iPad') > -1, //是否iPad
					            webApp: u.indexOf('Safari') == -1, //是否web应该程序，没有头部与底部
					            weixin: u.indexOf('MicroMessenger') > -1, //是否微信 （2015-01-22新增）
					            qq: u.match(/\sQQ/i) == " qq" //是否QQ
					        };
					    }(),
					    language:(navigator.browserLanguage || navigator.language).toLowerCase()
					}

				// 判断是安卓还是苹果
				if(browser.versions.android){
					getAppData(JSON.stringify(appData));
				}else{
					var iver = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);
					iver = parseInt(iver[1],10);
					// IOS 8以上用webkit方法,IOS 8以下用UIWebview方法
			        if(iver >= 8){
			            // AppModel是OC所注入的对象
    					window.webkit.messageHandlers.AppModel.postMessage({body:appData});
			        }else{
    					getAppData(appData);
			        }
				}
	    	}
	    }
	})